package com.zelix;

import java.io.*;
import java.util.*;

public class ZKMChangeLog {

    private static nh a;
    private String b;
    private re c;
    private boolean d;
    private PrintWriter e;
    private static char f = '/';
    private static char g = '.';
    private static String h = ".";
    private static String i = System.getProperty(z(z("\033s%\024\036\004\177;\020B\026n$\003")));
    int j;
    int k;
    int l;
    int m;
    private static String z[];

    public ZKMChangeLog(String s)
            throws Exception {
        super();
        int i1 = rb.a;
        d = true;
        e = new PrintWriter(System.out);
        a = new nh(null, null, false, null, null, null, null, null, false, false);
        a.a();
        b = s;
        b();
        c();
        a();
        if (gs.b != 0)
            rb.a = ++i1;
    }

    private void a() {
        boolean flag = false;
        boolean flag1 = false;
        if (m < a.r() || l < a.h()) {
            flag = true;
            flag1 = true;
        }
        if (k < a.x() || j < a.p())
            flag1 = true;
        if (flag1)
            System.err.println(a.o());
        if (flag)
            System.exit(1);
    }

    private ArrayList a(ArrayList arraylist) {
        int i1;
        int j1;
        j1 = rb.a;
        i1 = 0;
        for (; i1 < arraylist.size(); i1++) {
            String s = lt.a((String) arraylist.get(i1));
            arraylist.set(i1, s);
        }
        return arraylist;
    }

    private void b() {
        j = a.p();
        k = a.x();
        l = a.h();
        m = a.r();
    }

    private v6 a(String s) {
        String s1;
        String s3;
        ArrayList arraylist;
        StringTokenizer stringtokenizer;
        int l1;
        l1 = rb.a;
        s = s.trim();
        int i1 = s.indexOf(" ");

        if (i1 > -1) {
            s1 = s.substring(0, i1);
            String s2 = s.substring(i1 + 1);
            s2 = s2.trim();
            int j1 = s2.indexOf("(");
            if (j1 > 0) {

                s3 = s2.substring(0, j1);
                int k1 = s2.indexOf(")", j1);
                if (k1 > -1) {
                    s2 = s2.substring(j1 + 1, k1);
                    arraylist = new ArrayList();
                    stringtokenizer = new StringTokenizer(s2, ",");
                    while (stringtokenizer.hasMoreTokens()) {
                        arraylist.add(stringtokenizer.nextToken().trim());
                    }
                    String as[] = new String[arraylist.size()];
                    as = (String[]) arraylist.toArray(as);
                    return new v6(this, s1, s3, as);
                } else {
                    throw new IllegalArgumentException("'" + s + z[6]);
                }
            } else {
                throw new IllegalArgumentException("'" + s + z[8]);
            }
        } else {
            throw new IllegalArgumentException("'" + s + z[7]);
        }


    }

    public String getNewClassName(String s) {
        String s1 = c.f(s);
        if (s1 == null)
            return s;
        else
            return lt.a(s1);
    }

    public List getNewClassNames() {
        return a(c.h());
    }

    public String getNewFieldName(String s, String s1) {
        String s2 = null;
        String s3 = null;
        int i1 = s1.indexOf(" ");
        if (i1 > 0 && i1 < s1.length() - 1) {
            s3 = s1.substring(0, i1);
            s2 = s1.substring(i1 + 1);
        } else {
            throw new IllegalArgumentException("'" + s1 + z[0]);
        }
        if (c.m(s))
            return getNewFieldName(s, s2, s3);
        else
            return s2;
    }

    public String getNewFieldName(String s, String s1, String s2) {
        if (c.m(s)) {
            String s3 = dp.c(s2, null);
            if (c.c(lt.b(s), s1, s3)) {
                b();
                String s4 = c.b(lt.b(s), s1, s3);
                a();
                if (s4 == null)
                    return s1;
                else
                    return s4;
            } else {
                return s1;
            }
        } else {
            return s1;
        }
    }

    public String getNewMethodName(String s, String s1) {
        v6 v6_1 = a(s1);
        if (c.m(s))
            return getNewMethodName(s, v6_1.b, v6_1.d, v6_1.c);
        else
            return v6_1.b;
    }

    public String getNewMethodName(String s, String s1, String as[], String s2) {
        if (c.m(s)) {
            String s3 = dp.c(s2, null);
            if (c.c(lt.b(s), s1, as, s3)) {
                b();
                String s4 = c.b(lt.b(s), s1, as, s3);
                a();
                if (s4 == null)
                    return s1;
                else
                    return s4;
            } else {
                return s1;
            }
        } else {
            return s1;
        }
    }

    public String getNewPackageName(String s) {
        String s1 = c.h(s);
        if (s1 == null)
            return s;
        else
            return lt.a(s1);
    }

    public List getNewPackageNames() {
        return a(c.d());
    }

    public List getOldClassNames() {
        return a(c.e());
    }

    public List getOldFieldSignaturesForClass(String s) {
        return c.b(s);
    }

    public List getOldMethodSignaturesForClass(String s) {
        return c.c(s);
    }

    public List getOldPackageNames() {
        return a(c.a());
    }

    public boolean isOldClassPresent(String s) {
        return c.m(s);
    }

    public boolean isOldFieldPresent(String s, String s1) {
        if (c.m(s)) {
            int i1 = s1.indexOf(" ");
            if (i1 > 0 && i1 < s1.length() - 1) {
                String s2 = s1.substring(0, i1);
                String s3 = s1.substring(i1 + 1);
                return isOldFieldPresent(s, s3, s2);
            } else {
                throw new IllegalArgumentException("'" + s1 + z[0]);
            }
        } else {
            return false;
        }
    }

    public boolean isOldFieldPresent(String s, String s1, String s2) {
        if (c.m(s)) {
            String s3 = dp.c(s2, null);
            return c.c(lt.b(s), s1, s3);
        } else {
            return false;
        }
    }

    public boolean isOldMethodPresent(String s, String s1) {
        if (c.m(s)) {
            v6 v6_1 = a(s1);
            return isOldMethodPresent(s, v6_1.b, v6_1.d, v6_1.c);
        } else {
            return false;
        }
    }

    public boolean isOldMethodPresent(String s, String s1, String as[], String s2) {
        if (c.m(s)) {
            String s3 = dp.c(s2, null);
            return c.c(lt.b(s), s1, as, s3);
        } else {
            return false;
        }
    }

    public boolean isOldPackagePresent(String s) {
        return c.q(s);
    }

    private void c()
            throws Exception {
        BufferedReader bufferedreader;
        bf bf1;
        int i1;
        i1 = rb.a;
        boolean flag = true;
        bufferedreader = null;
        bf1 = null;
        try {
            label0:
            {
                label1:
                {
                    c = new re(b, a);
                    we we1 = we.b;
                    String s = re.a(new File(b));
                    if (s != null)
                        bufferedreader = new BufferedReader(new InputStreamReader(new FileInputStream(b), s));
                    else
                        bufferedreader = new BufferedReader(new FileReader(b));
                    if (we1 == null) {
                        we we2 = new we(bufferedreader);
                        if (i1 == 0)
                            break label1;
                    }
                    we.a(bufferedreader);
                }
                bf1 = we.j();
                bf1.a(null, c);
                if (bf1.e() == 0) {
                    System.exit(1);
                    if (i1 == 0)
                        break label0;
                }
                c.m();
            }
            c.g();
        } catch (FileNotFoundException fnfe) {
            throw new Exception(z[4] + b + "\"");
        } catch (lb lbe) {
            throw new Exception(z[5] + b + z[1] + lbe.getMessage() + "\"");
        } catch (ob obe) {
            throw new Exception(z[2] + b + z[1] + obe.getMessage() + "\"");
        } catch (tb tbe) {
            throw new Exception(z[3] + tbe.getMessage() + "\"");

        } finally {
            if (bf1 != null)
                bf1.c();
            if (bufferedreader != null)
                try {
                    bufferedreader.close();
                }
                catch (IOException ioexception) {
                }
        }
    }

    private static char[] z(String s) {
        char ac[] = s.toCharArray();
        int clen = ac.length;
        if (clen >= 2)
            return ac;
        ac[0] ^= 0x30;
        return ac;
    }

    private static String z(char ac[]) {
        for (int i = 0; i < ac.length; i++) {
            byte key = 0;
            switch (i % 5) {
                case 0:
                    key = 0x77;
                    break;
                case 1:
                    key = 26;
                    break;
                case 2:
                    key = 75;
                    break;
                case 3:
                    key = 113;
                    break;
                default:
                    key = 48;
                    break;
            }
            ac[i] ^= key;
        }
        return new String(ac).intern();
    }

    static {
        String as[] = new String[9];
        as[0] = z(z("P:\"\002\020\031u?QQWl*\035Y\023:-\030U\033~k\002Y\020t*\005E\005\177"));
        as[1] = z(z("U:qQ\022"));
        as[2] = z(z("'{9\002UW\1779\003_\005:<\031Y\033\177k\003U\026~\"\037WW8"));
        as[3] = z(z("'{9\002UW_9\003_\005:qQ\022"));
        as[4] = z(z("1s'\024\0202h9\036BW k2_\002v/\037\027\003:$\001U\031:-\030\\\022:i"));
        as[5] = z(z("));\1773\030S\026vk\024B\005u9QG\037s'\024\020\005\177*\025Y\031}kS"));
        as[6] = z(z("P:\"\002\020\031u?QQWl*\035Y\023:&\024D\037u/QC\036}%\020D\002h.Q\030D3"));
        as[7] = z(z("P:\"\002\020\031u?QQWl*\035Y\023:&\024D\037u/QC\036}%\020D\002h.Q\030F3"));
        as[8] = z(z("P:\"\002\020\031u?QQWl*\035Y\023:&\024D\037u/QC\036}%\020D\002h.Q\030E3"));
        z = as;
    }
}
